<?php

namespace apiend\modules\test\controllers;

use Yii;
use apiend\components\Controller;

/**
 * Default controller for the `test` module
 */
class WechatController extends Controller {

    /**
     * Renders the index view for the module
     * @return string
     */
    public function actionIndex() {
        return Yii::$app->wxpay->prepay([
            'body' => Yii::$app->name . '-测试订单课程报名',
            'detail' => '【课程报名】测试订单',
            'out_trade_no' => '401180911580227585',
            'total_fee' => 25900,
            'spbill_create_ip' => '39.71.42.105',
            'notify_url' => 'http://paymch.emhome.cn/notify',
            'trade_type' => 'APP',
            'time_expire' => '20180911163702',
        ]);
    }

}
